﻿@using System.Web.Optimization
@model List<ScrumPilot.Domain.Models.Project>
@{
    ViewBag.Title = "Tasks list";
    Boolean isAdmin = ScrumPilot.Helpers.SPHelpers.IsAdmin(int.Parse(this.User.Identity.Name));
}
@section HeadContent{
    <link href='@Url.Content("~/Content/jquery.multiselect.filter.css")' rel="stylesheet" type="text/css" />
    <link href='@Url.Content("~/Content/jquery.multiselect.css")' rel="stylesheet" type="text/css" />
    <link href='@Url.Content("~/Content/TasksList.css")' rel="stylesheet" type="text/css" />
}
@section AddJavaScript
{
    @Scripts.Render("~/TasksList/")
    <script type="text/javascript" src='@Url.Content("~/Scripts/TasksList.js")'></script>
    <script type="text/javascript">
        var myPage = new TasksList();
    </script>
}
@section JSDocumentReady
{
myPage.Ready();
}
@section PageOptionUrl
{
    '@Url.Action("GetTasks", "Tasks")',
    '@Url.Action("TasksListItem", "Tasks")','@Url.Action("UpdateInlineTask", "Tasks")','@Url.Content("~/Content/img/ajax-loader-l.gif")',
    '@Url.Action("SetFilterValue", "Tasks")' ,'@Url.Action("GetFilterValue", "Tasks")','@Url.Action("TaskAction", "Tasks")',
    '@Url.Action("TaskScore", "Tasks")','@Url.Action("TaskMove", "Tasks")'
}
<div class="grid2P">
    <div class="block-a" style="background-color: #69a6df; vertical-align: top; min-height: 900px; height: auto">
        <div class="stdcontent">
            <h2 style="color: #FFF">
                <span id="WDWtitle">Legend & filters</span>
            </h2>
            <ul id="LegendTasksList" style="list-style-type: none">
                <li class="wiListTodo">
                    <table style="width: 100%">
                        <tr>
                            <td class="htitle  wiListTodoHighLight ui-corner-all">To Do
                            </td>
                            <td style="vertical-align: middle; font-size: 14px">included in list
                                <input id='todochk' type="checkbox" />
                            </td>
                        </tr>
                    </table>
                </li>
                <li class="wiListInProgress">
                    <table style="width: 100%">
                        <tr>
                            <td class="htitle wiListInProgressHighLight ui-corner-all">In Progress
                            </td>
                            <td style="vertical-align: middle; font-size: 14px">included in list
                                <input id='progresschk' type="checkbox"/>
                            </td>
                        </tr>
                    </table>
                </li>
                <li class="wiListDone">
                    <table style="width: 100%">
                        <tr>
                            <td class="htitle wiListDoneHighLight  ui-corner-all">Done
                            </td>
                            <td style="vertical-align: middle; font-size: 14px">included in list
                                <input id='donechk' type="checkbox"/>
                            </td>
                        </tr>
                    </table>
                </li>
                <li class="wiListReopen">
                    <table style="width: 100%">
                        <tr>
                            <td class="htitle wiListReopenHighLight ui-corner-all">Reopen
                            </td>
                            <td style="vertical-align: middle; font-size: 14px">included in list
                                <input id='reopenchk' type="checkbox"/>
                            </td>
                        </tr>
                    </table>
                </li>
                <li class="wiListUnestimated">
                    <table style="width: 100%">
                        <tr>
                            <td class="htitle wiListUnestimatedHighLight ui-corner-all">Unestimated
                            </td>
                            <td style="vertical-align: middle; font-size: 14px">included in list
                                <input id='unestimatedchk' type="checkbox"/>
                            </td>
                        </tr>
                    </table>
                </li>
                <li class="wiListByProjects">
                    <table style="width: 100%">
                        <tr>
                            <td class="htitle wiListByProjectHighLight ui-corner-all" style="color: #FFFFFF">Project(s)
                            </td>
                            <td style="vertical-align: middle; text-align: left;">
                                <select id="projectsFilter" name="projectsFilter" multiple="multiple" class="MyProjectsFilter">
                                    @foreach (var project in Model)
                                    {
                                        if (project.Selected)
                                        {
                                        <option value="@project.ID" selected ="selected">@project.Name</option>
                                        }
                                        else
                                        {
                                        <option value="@project.ID">@project.Name</option>
                                        }
                                    }
                                </select>
                            </td>
                        </tr>
                    </table>
                </li>
            </ul>
            <h2 style="color: #FFF">
                <span>Types</span>
            </h2>
            <ul id="keypointsdiv" style="list-style-type: none">
                <li style="padding: 0px 6px 0px 6px; margin: 3px;">
                    <table id="" class="mdiv" style="width: 100%">
                        <tr>
                            <td class="mblock ui-corner-all">
                                <span>Tasks</span>
                            </td>
                            <td>Include Tasks in list
                            </td>
                            <td style="width: 10%">
                                <input id="taskflt" type="checkbox" />
                            </td>
                        </tr>
                    </table>
                </li>
                <li style="padding: 0px 6px 0px 6px; margin: 3px;">
                    <table id="" class="mdiv" style="width: 100%">
                        <tr>
                            <td class="mblock ui-corner-all">
                                <span>Bugs</span>
                            </td>
                            <td>Include Bugs in list
                            </td>
                            <td style="width: 10%">
                                <input id="bugflt" type="checkbox"/>
                            </td>
                        </tr>
                    </table>
                </li>
            </ul>
        </div>
    </div>
    <div class="block-b">
        <div id="mainstdcontent">
            <h2>Tasks list</h2>
            <ul id="MainTasksList">
            </ul>
        </div>
    </div>
</div>
@if (isAdmin)
{
    <div id="dialog-score" title="Set score & time" style="display: none">
    </div>
}
<div id="dialog-move" title="Move item to another project" style="display: none">
</div>
